package flst.ipiweb.process;

import java.util.List;

import flst.ipiweb.persistance.FactoryDAL;
import flst.ipiweb.transverse.IPIWebException;
import flst.ipiweb.transverse.Relais;

public class RelaisProcess {

	
	public List<Relais> getAllRelais() throws IPIWebException{
		return FactoryDAL.getInstance().getRelaisDAL().getAllRelais();
	}
	
	public Relais getRelaisById(int id) throws IPIWebException{
		return FactoryDAL.getInstance().getRelaisDAL().getRelaisById(id);
	}
	
	public void CreateRelais(Relais rel) throws IPIWebException{
		FactoryDAL.getInstance().getRelaisDAL().CreateRelais(rel);
	}
	
	public void UpdateRelais(Relais rel) throws IPIWebException{
		FactoryDAL.getInstance().getRelaisDAL().UpdateRelais(rel);
	}
	
	public int GenerateId() throws IPIWebException{
		return FactoryDAL.getInstance().getRelaisDAL().GenerateId();
	}
	
	public void DesactiverRelais(int id) throws IPIWebException{
		FactoryDAL.getInstance().getRelaisDAL().DesactiverRelais(id);
	}
}
